#include <iostream>

using namespace std;

int main()
{
        int a = 32167;

        cout << a << endl;

        int &p = a;
        p = 12345;
        cout << a << endl;

        int &q = p;
        q = 45678;
        cout << a << endl;
        cout << "&p = " << &p << ", &a = " << &a << endl;

        return 0;
}
